<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>详情</title>
    <meta name="keywords" content="个人网站" />
    <meta name="description" content="个人网站" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="/static/css/base.css" rel="stylesheet">
    <link href="/static/css/index.css" rel="stylesheet">
    <link href="/static/css/m.css" rel="stylesheet">
    <script src="/static/js/jquery.min.js" type="text/javascript"></script>
    <script src="/static/js/jquery.easyfader.min.js"></script>
    <script src="/static/js/scrollReveal.js"></script>
    <script src="/static/js/common.js"></script>
    <script src="/static/js/page.js"></script>
</head>
<style>
    .bloginfo div{
        color: #00a0e9;
    }
    .gbko textarea{
        width: 700px;
        height: 200px;
        border: 2px solid #3276b1;
    }
    .btn button{
        margin-top: 20px;
        margin-left:10px;
        width: 50px;
        height: 30px;
        border: 1px solid #3276b1;
    }
    /*.gbko ul {*/
        /*width: 700px;*/
        /*height: 200px;*/
        /*border: 2px solid #3276b1;*/
    /*}*/
</style>

}
<header>
    <!--menu begin-->
    <div class="menu">
        <nav class="nav" id="topnav">
            <h1 class="logo"><a href="{{url('index')}}">个人网站</a></h1>
            <li><a href="{{url('index')}}">网站首页</a></li>
            <li><a href="{{url('phplist')}}">PHP</a></li>
            <li><a href="{{url('sqllist')}}">SQL</a></li>
            <li><a href="{{url('about')}}">关于我</a></li>
            {{--<li><a href="{{url('comment')}}">评论</a> </li>--}}
            <div id="search_bar" class="search_bar">
                <form  id="searchform" action="{{url('index')}}" method="get" name="searchform">
                    <input class="input" placeholder="想搜点什么呢..." type="text" name="keyboard" id="keyboard">
                    <span class="search_ico"></span>
                </form>
            </div>
        </nav>

    </div>
    <!--menu end-->
</header>
{{--<article>--}}
    <h1 class="t_nav"><span>您现在的位置是：首页 > 详情 ></span><a href="{{url('index')}}" class="n1">网站首页</a><a href="/" class="n2">详情</a></h1>
    <div class="infosbox">
        <div class="newsview">
            @foreach($result as $item)
            <div class="bloginfo">
                    <div class="detail">主要详情：{{$item['desc']}}</div><br>
                    <div class="detail">时间：{{$item['add_time']}}</div><br>
                    <div class="detail">阅读量：{{$item['read_num']}}</div><br>
                    <div class="detail">点赞 {{$item['click']}}</div>

            </div>
           @endforeach
        </div>
        <div class="share">
            {{--<p class="diggit"><a href="JavaScript:makeRequest('/e/public/digg/?classid=3&amp;id=19&amp;dotop=1&amp;doajax=1&amp;ajaxarea=diggnum','EchoReturnedText','GET','');"> 很赞哦！ </a>(<b id="diggnum"><script type="text/javascript" src="/e/public/ViewClick/?classid=2&id=20&down=5"></script>13</b>)</p>--}}
            <p class="dasbox"><a href="javascript:void(0)" onClick="dashangToggle()" class="dashang" title="打赏，支持一下">打赏本站</a></p>
            <div class="hide_box"></div>
            <div class="shang_box"> <a class="shang_close" href="javascript:void(0)" onclick="dashangToggle()" title="关闭">关闭</a>
                <div class="shang_tit">
                    <p>感谢您的支持，我会继续努力的!</p>
                </div>
                <div class="shang_payimg"> <img src="/static/images/alipayimg.jpg" alt="扫码支持" title="扫一扫"> </div>
                <div class="pay_explain">扫码打赏，你说多少就多少</div>
                <div class="shang_payselect">
                    <div class="pay_item checked" data-id="alipay"> <span class="radiobox"></span> <span class="pay_logo"><img src="/static/images/alipay.jpg" alt="支付宝"></span> </div>
                    <div class="pay_item" data-id="weipay"> <span class="radiobox"></span> <span class="pay_logo"><img src="/static/images/wechat.jpg" alt="微信"></span> </div>
                </div>
                <script type="text/javascript">
                    $(function(){
                        $(".pay_item").click(function(){
                            $(this).addClass('checked').siblings('.pay_item').removeClass('checked');
                            var dataid=$(this).attr('data-id');
                            $(".shang_payimg img").attr("src","/static/images/"+dataid+"img.jpg");
                            $("#shang_pay_txt").text(dataid=="alipay"?"支付宝":"微信");
                        });
                    });
                    function dashangToggle(){
                        $(".hide_box").fadeToggle();
                        $(".shang_box").fadeToggle();
                    }
                </script>
            </div>
        </div>
        <div class="otherlink">
            @foreach($connection as $val)
            <h2>相关文章</h2>
            <ul>
                <li><a href="{{url('comment')}}?id={{$val['id']}}" title="{{$val['article_name']}}">{{$val['article_name']}}</a></li>
            </ul>
            @endforeach
        </div>
        <div class="news_pl">
            <h2>最新评论列表</h2>
            <div class="gbko">
                <ul>
                    @foreach($comlist as $com)
                        <li>评论者名：{{$com['user_name']}}</li>
                        <li>评论内容：{{$com['comment']}}</li>
                        <li>评论时间：{{$com['comment_time']}}</li>
                        <br>
                    @endforeach
                </ul>
            </div>
        </div>
        <div class="news_pl">
            <h2>文章评论</h2>
            <div class="gbko">
             <textarea class="textarea" id="comment"  placeholder="发表评论"name="comment"></textarea></div>
            <div class="btn">
                <button onclick="getdetail()" class="btn green"><i class="fa fa-check"></i>评论 </button>
            </div>
        </div>
    </div>
    <div class="sidebar">
        <div class="tuijian">
            <h2 class="hometitle">推荐文章</h2>
            <ul class="tjpic">
                <i><img src="https://ss0.baidu.com/73F1bjeh1BF3odCf/it/u=1351927680,1733422780&fm=85&s=8CA6E9135F5863C64CE1B5CE000050B3"></i>
                <p><a href="http://xiangw.top/article_detail/26">用nginx做反向代理和负载均衡</a></p>
            </ul>
            <ul class="sidenews">
                <li> <i><img src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=4013168728,1454224904&fm=27&gp=0.jpg"></i>
                    <p><a href="https://imshusheng.com/php/131.html">phpstorm使用教程！</a></p>
                    <span>2018-05-13</span> </li>
                <li> <i><img src="https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2624948864,2994610670&fm=27&gp=0.jpg"></i>
                    <p><a href="https://imshusheng.com/sql/77.htm">Redis操作命令</a></p>
                    <span>2018-05-13</span> </li>
            </ul>
        </div>
        <div class="tuijian">
            <h2 class="hometitle">点击排行</h2>
            <ul class="tjpic">
                <i><img src="https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1406360216,4085888949&fm=27&gp=0.jpg"></i>
                <p><a href="https://www.easywechat.com/docs/master">微信公众号</a></p>
            </ul>
            <ul class="sidenews">
                <li> <i><img src="https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=1709688838,2620870679&fm=58&bpow=2008&bpoh=1744"></i>
                    <p><a href="http://yun.itheima.com/">传智博客</a></p>
                    <span>2018-05-13</span> </li>
                <li> <i><img src="https://ss2.baidu.com/6ONYsjip0QIZ8tyhnq/it/u=278743832,3927440098&fm=58&s=06E6DD16CCB109825DF431C601007031&bpow=121&bpoh=75"></i>
                    <p><a href="http://www.imooc.com/course/list?c=php">慕课网</a></p>
                    <span>2018-05-13</span> </li>
            </ul>
        </div>
        <div class="cloud">
            <h2 class="hometitle">标签云</h2>

            <ul>
                @foreach($list as $v)
                    <li>
                        <a href="{{$v['url']}}">{{$v['popular_tagname']}}</a>
                    </li>
                @endforeach
            </ul>

        </div>
        <div class="links">
            <h2 class="hometitle">友情链接</h2>
            <ul>
                @foreach($res as $value)
                    <li><a href="{{$value['links_url']}}" target="_blank">{{$value['links_name']}}]</a></li>
                @endforeach
            </ul>
        </div>
        <div class="guanzhu" id="follow-us">
            <h2 class="hometitle">关注我们 么么哒！</h2>
            <ul>
                <li class="email"><a href="/" target="_blank"><span>邮箱帐号</span>1076187973@qq.com</a></li>
                <li class="wxgzh"><a href="/" target="_blank"><span>微信号</span>1076187973</a></li>
            </ul>
        </div>
        <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=1076187973&site=qq&menu=yes">
            <img border="0" src="http://wpa.qq.com/pa?p=2:1076187973:51"
                 alt="点击这里给我发消息" title="点击这里给我发消息"/>
        </a>
    </div>
{{--</article>--}}
<footer>
    <p>CopyRight &copy; by <a href="" target="_blank">个人</a> <a href="http://www.miitbeian.gov.cn/state/outPortal/loginPortal.action">豫ICP备16041901号-1</a></p>
</footer>
<a href="#" class="cd-top">Top</a>
</html>
<script type="text/javascript" src="/static/ui/lib/layer/2.4/layer.js"></script>
<script>
    function getUrlParam(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
        var r = window.location.search.substr(1).match(reg); //匹配目标参数
        if (r != null) return unescape(r[2]); return null; //返回参数值
    }

    function getdetail() {
        {{--var aaa = '{{url('comments')}}';--}}
        var text = $(" textarea[ name='comment' ] ").val();
        var id = getUrlParam('id');
        var newData = {
            text:text,
            id:id
        }
        // console.log(text,id);
        $.ajax({
            type: "GET",
            url: "{{url('comments')}}",
            data: newData,
            dataType: "json",
            success: function(data){
                layer.msg('评论成功', {icon: 1, time: 1000});
                // window.location.href = aaa;
            }

        });

    }

</script>
